package com.alinesno.cloud.portal.auto;

import java.io.File;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.alinesno.cloud.portal.auto.constants.AutoConstants;
import com.alinesno.cloud.portal.auto.constants.CommonPath;

/**
 * 文件配置
 * 
 * @author WeiXiaoJin
 * @since 2019年11月23日 上午11:08:54
 */
@Configuration
public class WebAppConfig implements WebMvcConfigurer {

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/"+AutoConstants.Path.REPORT+"/**").addResourceLocations("file:"+CommonPath.autoHome()+File.separator);
	}
}